#include <iostream>
#include "Mesh.h"
#include "Solver.h"
using namespace std;

void main()
{
	Point a, b, c, d;
	double elemSize = 3;

	a.x = 1;
	a.y = 1;

	b.x = 1;
	b.y = 80;

	c.x = 60;
	c.y = 1;

	d.x = 60;
	d.y = 80;

	vector<Point> test;
	test.push_back(a);
	test.push_back(b);
	test.push_back(c);
	test.push_back(d);

	cout << "Enter desired element size: ";
	cin >> elemSize;

	cout << "Meshing..." << endl;
	Mesh custom;
	custom.triangulateShape(test,elemSize);

	cout << "Adding Boundaries..." << endl;
	custom.addFirstBoundary(FirstBoundary(0,300));
	custom.addSecondBoundary(SecondBoundary(&custom.elementList[4],1,2,-80));
	custom.setKFactor(8);

	//Mesh testowaSiatka;
	Solver przykladowySolver;

	cout << "Solving..." << endl;
	przykladowySolver.solve(&custom);
	przykladowySolver.tPrint();
	system("pause");
}